package com.yun.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserDTO;
import com.heima.model.user.pojos.ApUser;
import com.yun.user.service.ApUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 登录功能接口
 * @author: yu
 * @data 2025年07月14日 07:39
 */
@RestController
@RequestMapping("/api/v1/login")
@RequiredArgsConstructor
public class LoginController {
    private final ApUserService apUserService;

    /**
     * @description: 登录
     * @title: login
     * @param: [userDTO]
     */
    @PostMapping("/login_auth")
    ResponseResult login(@RequestBody ApUserDTO userDTO) {
        return apUserService.login(userDTO);
    }

}
